package cn.rkylin.oms.ext.cainiao.returnStockin.vo;

import cn.rkylin.oms.common.consts.ReturnStockinStatus;
import cn.rkylin.oms.ext.cainiao.returnStockin.domain.ReturnStockin;

/**
 * 退货入库单VO
 * 
 * @author 齐涛
 * @version 1.0
 * @created 28-9-2017 10:51:30
 */
public class ReturnStockinVO extends ReturnStockin {

    private static final String STATUS_SKUSHOW = "<span class=\"sku-show fa fa-chevron-down\" stockinId=\"%s\"></span>";
    private static final String OPERATION_BTN_CANCEL = "<button onclick=\"operationCancel(this)\" stockinId=\"%s\" type=\"button\" class=\"btn btn-danger btn-xs\" pepid='returnstockinCancel'><i class=\"fa fa-times\"></i>&nbsp;取消</button>";
    private static final String OPERATION_BTN_UPDATE_REMARK = "<button onclick=\"operationUpdateRemark(this)\" stockinId=\"%s\" type=\"button\" class=\"btn btn-info btn-xs\" pepid='returnstockinRemark'><i class=\"fa fa-edit\"></i>&nbsp;修改备注</button>";

    private static final long serialVersionUID = -1623897436921730948L;

    // 基本查询条件
    private String quickSearch;

    // 高级查询条件
    // 店铺Id
    private String shopId;

    // 入库种类(计划plan,实际real)
    private String kind;

    // 生成开始日期
    private String createTimeStart;

    // 生成结束日期
    private String createTimeEnd;

    // 入库开始日期
    private String factInTimeStart;

    // 入库结束日期
    private String factInTimeEnd;

    // 完成开始日期
    private String finishTimeStart;

    // 完成结束日期
    private String finishTimeEnd;

    // 商品编码
    private String goodsCode;

    // 商品名称
    private String goodsName;

    // 规格编码
    private String skuCode;

    // 规格名称
    private String skuName;

    // 发货状态
    private String returnStockinStatus;

    // 排序
    private String orderBy;

    // 商品信息展开按钮扩展
    private String skuShow;

    // 操作按钮
    private String operation;

    // 网店
    private String shopName;

    // 客户ID
    private String buyerNick;

    // 买家发货人
    private String cons;

    // 取消前状态
    private String cancelBeforeStatus;

    // 买家发货人电话
    private String consTel;

    // 买家发货人手机
    private String consMobile;

    // 买家发货人地址
    private String consAddr;

    // 奇门货主编码
    private String qmOwnercode;

    // 奇门货主Id
    private String qmCustomerid;

    public String getQuickSearch() {
        return quickSearch;
    }

    public void setQuickSearch(String quickSearch) {
        this.quickSearch = quickSearch;
    }

    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public String getCreateTimeStart() {
        return createTimeStart;
    }

    public void setCreateTimeStart(String createTimeStart) {
        this.createTimeStart = createTimeStart;
    }

    public String getCreateTimeEnd() {
        return createTimeEnd;
    }

    public void setCreateTimeEnd(String createTimeEnd) {
        this.createTimeEnd = createTimeEnd;
    }

    public String getFactInTimeStart() {
        return factInTimeStart;
    }

    public void setFactInTimeStart(String factInTimeStart) {
        this.factInTimeStart = factInTimeStart;
    }

    public String getFactInTimeEnd() {
        return factInTimeEnd;
    }

    public void setFactInTimeEnd(String factInTimeEnd) {
        this.factInTimeEnd = factInTimeEnd;
    }

    public String getFinishTimeStart() {
        return finishTimeStart;
    }

    public void setFinishTimeStart(String finishTimeStart) {
        this.finishTimeStart = finishTimeStart;
    }

    public String getFinishTimeEnd() {
        return finishTimeEnd;
    }

    public void setFinishTimeEnd(String finishTimeEnd) {
        this.finishTimeEnd = finishTimeEnd;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getSkuCode() {
        return skuCode;
    }

    public void setSkuCode(String skuCode) {
        this.skuCode = skuCode;
    }

    public String getSkuName() {
        return skuName;
    }

    public void setSkuName(String skuName) {
        this.skuName = skuName;
    }

    public String getReturnStockinStatus() {
        return returnStockinStatus;
    }

    public void setReturnStockinStatus(String returnStockinStatus) {
        this.returnStockinStatus = returnStockinStatus;
    }

    public String getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getSkuShow() {
        return String.format(STATUS_SKUSHOW, this.getStockinId()).toString();
    }

    public void setSkuShow(String skuShow) {
        this.skuShow = String.format(STATUS_SKUSHOW, "").toString();
    }

    public String getOperation() {
        StringBuffer opButton = new StringBuffer();
        if (ReturnStockinStatus.WAIT_RECEIVE.equals(this.getReturnStockinStatus())
                || ReturnStockinStatus.RECEIVING.equals(this.getReturnStockinStatus())) { // 代收货，收货中
            opButton.append(String.format(OPERATION_BTN_CANCEL, this.getStockinId()));
            opButton.append("&nbsp;");
            opButton.append(String.format(OPERATION_BTN_UPDATE_REMARK, this.getStockinId()));
        } else if (ReturnStockinStatus.COMPLETE.equals(this.getReturnStockinStatus())) { // 已完成
            opButton.append(String.format(OPERATION_BTN_UPDATE_REMARK, this.getStockinId()));
        }

        operation = opButton.toString();
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getBuyerNick() {
        return buyerNick;
    }

    public void setBuyerNick(String buyerNick) {
        this.buyerNick = buyerNick;
    }

    public String getCons() {
        return cons;
    }

    public void setCons(String cons) {
        this.cons = cons;
    }

    public String getCancelBeforeStatus() {
        return cancelBeforeStatus;
    }

    public void setCancelBeforeStatus(String cancelBeforeStatus) {
        this.cancelBeforeStatus = cancelBeforeStatus;
    }

    public String getConsTel() {
        return consTel;
    }

    public void setConsTel(String consTel) {
        this.consTel = consTel;
    }

    public String getConsMobile() {
        return consMobile;
    }

    public void setConsMobile(String consMobile) {
        this.consMobile = consMobile;
    }

    public String getConsAddr() {
        return consAddr;
    }

    public void setConsAddr(String consAddr) {
        this.consAddr = consAddr;
    }

    public String getQmOwnercode() {
        return qmOwnercode;
    }

    public void setQmOwnercode(String qmOwnercode) {
        this.qmOwnercode = qmOwnercode;
    }

    public String getQmCustomerid() {
        return qmCustomerid;
    }

    public void setQmCustomerid(String qmCustomerid) {
        this.qmCustomerid = qmCustomerid;
    }

}
